package org.example.backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 用户行为表
 * @TableName user_actions
 */
@TableName(value ="user_actions")
@Data
public class UserActions {
    /**
     * 记录ID，主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID(可为空表示未登录用户)
     */
    @TableField(value = "user_id")
    private Long user_id;

    /**
     * 壁纸ID
     */
    @TableField(value = "wallpaper_id")
    private Long wallpaper_id;

    /**
     * 行为类型(view/download/like/favorite)
     */
    @TableField(value = "action_type")
    private Object action_type;

    /**
     * 用户IP地址
     */
    @TableField(value = "ip_address")
    private String ip_address;

    /**
     * 用户代理信息
     */
    @TableField(value = "user_agent")
    private String user_agent;

    /**
     * 行为时间
     */
    @TableField(value = "created_at")
    private Date created_at;
}